{% include 'header.html' %}

<div id="code"></div>

<button id="butSub" class="butSub">发送支付请求</button>


<script type="text/javascript" charset="UTF-8">


    $(function () {

        var data = '{{ data| safe  }}';
        da = eval("'" + data + "'");
        console.log(da)

        $('#code').qrcode(da);


        $('.butSub').click(function () {

            $.ajax({
                type: 'POST',
                url: '/push/',
                data: {data: da},
                success: function (result) {
                    if (result) {
                        $('#code').html('支付已推送')
                    }
                }
            });

        })

    });


</script>


{% include 'footer.html' %}